<template>
  <el-card class="form-container" shadow="never">
    <el-form :model="workorderList"
             :rules="rules"
             :inline="true"
             label-position="left"
             ref="workorderListFrom"
             label-width="150px">

      <div>
        <el-form-item label="工单号：">
          <span>{{workorderList.orderid}}</span>
        </el-form-item>
        <el-form-item label="创建人：">
          <span>{{workorderList.creatperson}}</span>
        </el-form-item>
        <el-form-item label="创建时间：">
          <span> 
            {{(new Date(workorderList.creattime)).getFullYear() +'/'
            + ((new Date(workorderList.creattime)).getMonth()+1)+ '/'
            + (new Date(workorderList.creattime)).getDate()}}
          </span>
        </el-form-item>
      </div>
      <div>
        <el-form-item label="当前处理组：">
          <span>{{workorderList.handlegroup}}</span>
        </el-form-item>
        <el-form-item label="当前处理人：">
          <span>{{workorderList.handleperson}}</span>
        </el-form-item>
        <el-form-item label="问题类型：">
          <span>{{workorderList.problemtype}}</span>
        </el-form-item>
      </div>
      <div>
        <el-form-item label="当前状态：">
          <span v-if="workorderList.orderstatus ==0">退单</span>
          <span v-else-if="workorderList.orderstatus ==1">未处理</span>
          <span v-else-if="workorderList.orderstatus ==2">处理中</span>
          <span v-else-if="workorderList.orderstatus ==3">归档</span>
          <span v-else-if="workorderList.orderstatus ==4">挂起</span>
        </el-form-item>
        <el-form-item label="处理时效：">
          <el-input
           style="width: 4vw"
            placeholder="请输入内容"
            v-model="workorderList.periods">
          </el-input>小时
        </el-form-item>
        <el-form-item label="剩余时效：">
          <span>{{workorderList.periods}}小时</span>
        </el-form-item>
      </div>
      <div>
        <el-form-item label="催办次数：">
          <span>{{workorderList.urgetimes}}</span>
        </el-form-item>
        <el-form-item label="紧急程度：">
          <span v-if="workorderList.urgelevel==0" style="color: red">高</span>
          <span v-else-if="workorderList.urgelevel==1">中</span>
          <span v-else-if="workorderList.urgelevel==2">低</span>
        </el-form-item>
        <el-form-item label="结束时间：">
          <span>{{workorderList.periods}}</span>
        </el-form-item>
        <el-form-item label="处理时长：">
          <span>{{workorderList.periods}}</span>
        </el-form-item>
      </div>
      <div>
        <el-form-item label="问题描述：">
          <el-input
            size="small" style="width: 10vw"
            placeholder="请输入内容"
            v-model="workorderList.description">
          </el-input>
        </el-form-item>
      </div>
      <div>
        <el-form-item label="附件下载：">
          <el-input
            size="small" style="width: 10vw"
            placeholder="待开发"
            suffix-icon="el-icon-date">
          </el-input>
        </el-form-item>
      </div>
      <div>
        <el-form-item>
          <el-button type="primary" @click="onSubmit('workorderListFrom')">保存</el-button>
          <!--<el-button v-if="!isEdit" @click="resetForm('workorderListFrom')">取消</el-button>-->
        </el-form-item>
      </div>
    </el-form>
  </el-card>
</template>

<script>
  import axios from 'axios';
  export default {
    name: "OrderInfo",
    id:'',
    data() {
      return {
        workorderList:[]


      }
    },
    mounted(){
      this.id = this.$route.query.id;
      let params = new URLSearchParams();
      params.append("id",this.id)
      axios.post("/api/orderDetail/order",params)
        .then((res)=>{
          this. workorderList=res.data.data
        })
    }
  }
</script>

<style scoped>

</style>

